/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ejb;

import entity.Utente;
import entity.UtenteFacadeLocal;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author Marco
 */
@Stateless
public class ControllerUtente implements ControllerUtenteLocal {
    @EJB
    private UtenteFacadeLocal utenteFacade;

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    @Override
    public void insertUtente(String nomeUtente, String password) {
        Utente u = new Utente();
        u.setNomeUtente(nomeUtente);
        u.setPassword(password);
        utenteFacade.create(u);
    }

    @Override
    public void findUtente(String nomeUtente) {
        Utente u = new Utente();
        u.setNomeUtente(nomeUtente);
        utenteFacade.find(u);
    }
    
    @Override
    public void prova(String nomeUtente) {
        
    }
    
    
    
}
